/*
 * Copyright (c) 2008-2021 浩瀚深度 All Rights Reserved.
 *
 * <p>FileName: DataSourceConfigMapper.java</p>
 *
 * @author zz
 * @date 2024/2/4
 * @version 1.0
 * History:
 * v1.0.0 2024/2/4 Create
 */
package com.sqlweb.sqlweb.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sqlweb.sqlweb.entity.DataSourceConfig;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;

import java.util.List;

/**
 * <p>Title: DataSourceConfigMapper</p>
 * <p>Description: </p>
 *
 * @author zz
 */

@Mapper
public interface DataSourceConfigMapper extends BaseMapper<DataSourceConfig> {
    /**
     * 查询全部数据源
     *
     * @return 数据源列表
     */
    List<DataSourceConfig> selectAll();

    /**
     * 新增数据源
     *
     * @return 数据源ID
     */
    @Override
    @Options(useGeneratedKeys = true, keyProperty = "id")
    int insert(DataSourceConfig dataSourceEntity);
}

